<!DOCTYPE html>
{% from 'common/static.html' import static %}
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="csrf_token" content="{{ csrf_token() }}">
    <title>{% block title %}{% endblock %}</title>
    <link rel="icon" href="{{ static('images/favicon.ico') }}" type="image/gif">
    <link rel="stylesheet" href="http://media.junpy.club/static-bootstrap.min.css">
    <link rel="stylesheet" href="{{ static('bootstrap/css/bootstrap-theme.css') }}">
    <link rel="stylesheet" href="http://media.junpy.club/static-sweetalert.css">
    <link rel="stylesheet" href="{{ static('front/css/front_base.css') }}">
    <script type="text/javascript" src="http://media.junpy.club/static-jquery.min.js"></script>
    <script type="text/javascript" src="http://media.junpy.club/static-bootstrap.min.js"></script>
    <script src="{{ static('common/juneajax.js') }}"></script>
    <script src="http://media.junpy.club/static-sweetalert.min.js"></script>
    <script src="{{ static('common/sweetalert/junealert.js') }}"></script>
    <script type="text/javascript">
        document.onreadystatechange = function(){
        if(document.readyState == "complete"){//如果加载完成
            $('.loading').fadeOut();//让loading效果消失，显示页面
        }
    }
    </script>
    {% block head %}{% endblock %}
</head>
<body>
{#加载中#}
<div class="loading">
    <div class="loading-img"></div>
</div>
<nav class="navbar navbar-default">
    <div class="container-fluid">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse"
                    data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
                <span class="sr-only">June论坛</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="/">June论坛</a>
        </div>
        <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
            <ul class="nav navbar-nav">
                <li><a href="/">首页</a></li>
            </ul>
            <form class="navbar-form navbar-left">
                <div class="form-group">
                    <input type="text" class="form-control" placeholder="请输入关键字">
                </div>
                <button type="submit" class="btn btn-default">搜索</button>
            </form>
            {% if g.front_user %}
                <span id="is-login" data-login="1"></span>
                <div class="dropdown pull-right">
                    <span class="nav navbar-nav navbar-right" id="dropdownMenu1" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
                        {{ g.front_user.username }}
                        <span class="caret"></span>
                    </span>
                    <ul class="dropdown-menu" aria-labelledby="dropdownMenu1">
                        <li><a href="#">个人中心</a></li>
                        <li><a href="#">设置</a></li>
                        <li><a href="{{ url_for('front.logout') }}">退出登录</a></li>
                    </ul>
                </div>
            {% else %}
            <ul class="nav navbar-nav navbar-right">

                <li><a href="{{ url_for('front.signin') }}">登录</a></li>
                <li><a href="{{ url_for('front.signup') }}">注册</a></li>
            </ul>
            {% endif %}
        </div>
    </div>
</nav>
<div class="main-container">
{% block content %}{% endblock %}
</div>
</body>
</html>